package com.atguigu.common.constant;

import lombok.Getter;

/**
 * @create: 2024/8/26
 * @author: gyhe10
 * @description:
 **/

public interface WareConstant {

    /**
     * ware 服务交换机
     */
    String STOCK_EVENT_EXCHANGE = "stock-event-exchange";
    /**
     * ware服务交换机路由到延迟队列的路由键
     */
    String STOCK_LOCKED_KEY = "stock.locked";

    @Getter
    enum PurchaseStatusEnum{
        CREATED(0,"新建"),
        ASSIGNED(1,"已分配"),
        RECEIVE(2,"已领取"),
        FINISH(3,"已完成"),
        HASERROR(4,"有异常");

        private final int code;
        private final String msg;

        PurchaseStatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }
    }

    @Getter
    enum PurchaseDetailStatusEnum{
        CREATED(0,"新建"),
        ASSIGNED(1,"已分配"),
        BUYING(2,"正在采购"),
        FINISH(3,"已完成"),
        HASERROR(4,"采购失败");

        private final int code;
        private final String msg;

        PurchaseDetailStatusEnum(int code, String msg) {
            this.code = code;
            this.msg = msg;
        }
    }
}
